users = ['body1','body2','body2','body3']
user_dict = {}
for user in users :
    if user not in user_dict :
        user_dict[user] = 1
    else:
        user_dict[user] += 1
    user_dict.setdefault(user,0)

print(user_dict)

from collections import  defaultdict

mydict = defaultdict(int)

for user in users:
    mydict[user] += 1
print(mydict)